package com.bestv.bsr.core.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * 百视通中台配置
 *
 * @author taojiacheng
 */
@ConfigurationProperties(prefix = "recommend.zt")
@Configuration
@Data
public class ZTRecommendProperties {

    /**
     * baseUrl
     */
    private String baseurl;

    /**
     * recommend engine business filed
     */
    private String bizField;

    /**
     * 中台推荐接口需要转换场景ID
     */
    private Map<String, String> sceneMap;

    /**
     * 直播场景Id
     */
    private Map<String, String> liveSceneMap;

    /**
     * 回看场景Id
     */
    private Map<String, String> lookbackSceneMap;

    /**
     * 中台推荐支持的推荐类型
     */
    private Map<String, String> itemTypeMap;

    /**
     * 最大推荐节目数
     */
    private int maxRecommendSize;

    /**
     * 是否开启缓存
     */
    private boolean isCacheEnabled;

    private long expireSecond;

    /**
     * sentinel 熔断配置
     */
    @NestedConfigurationProperty
    private SentinelProperties sentinel;

}
